﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Roton.ZZT
{
    /// <summary>
    /// Interface used to interact with Board Property memory.
    /// </summary>
    interface IBoard
    {
        /// <summary>
        /// X location of the camera. Used in Super ZZT only.
        /// </summary>
        int CameraX { get; set; }

        /// <summary>
        /// Y location of the camera. Used in Super ZZT only.
        /// </summary>
        int CameraY { get; set; }

        /// <summary>
        /// If true, the board is dark. Used in ZZT only.
        /// </summary>
        bool Dark { get; set; }

        /// <summary>
        /// X entry location for the player.
        /// </summary>
        int EnterX { get; set; }

        /// <summary>
        /// Y entry location for the player.
        /// </summary>
        int EnterY { get; set; }

        /// <summary>
        /// Index for the board off the east edge.
        /// </summary>
        int ExitEast { get; set; }

        /// <summary>
        /// Index for the board off the north edge.
        /// </summary>
        int ExitNorth { get; set; }

        /// <summary>
        /// Index for the board off the south edge.
        /// </summary>
        int ExitSouth { get; set; }

        /// <summary>
        /// Index for the board off the west edge.
        /// </summary>
        int ExitWest { get; set; }

        /// <summary>
        /// Get the height of the board.
        /// </summary>
        int Height { get; }

        /// <summary>
        /// Name of the board.
        /// </summary>
        IString Name { get; }

        /// <summary>
        /// Maximum number of bullets the player may own on the board simultaneously.
        /// </summary>
        int Shots { get; set; }

        /// <summary>
        /// Time limit in seconds for the board.
        /// </summary>
        int TimeLimit { get; set; }

        /// <summary>
        /// Get the width of the board.
        /// </summary>
        int Width { get; }

        /// <summary>
        /// Get the color of a tile.
        /// </summary>
        /// <param name="x">X location of the tile.</param>
        /// <param name="y">Y location of the tile.</param>
        /// <returns>The tile's color.</returns>
        int GetTileColor(int x, int y);

        /// <summary>
        /// Get the ID of a tile.
        /// </summary>
        /// <param name="x">X location of the tile.</param>
        /// <param name="y">Y location of the tile.</param>
        /// <returns>The tile's ID.</returns>
        int GetTileID(int x, int y);

        /// <summary>
        /// Set the color of a tile.
        /// </summary>
        /// <param name="x">X location of the tile.</param>
        /// <param name="y">Y location of the tile.</param>
        /// <param name="c">Color to be set.</param>
        void SetTileColor(int x, int y, int c);

        /// <summary>
        /// Set the ID of a tile.
        /// </summary>
        /// <param name="x">X location of the tile.</param>
        /// <param name="y">Y location of the tile.</param>
        /// <param name="id">ID to be set.</param>
        void SetTileID(int x, int y, int id);
    }
}
